home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_ORBit.idb / usr / freeware / include / orb / iop.h.z / iop.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  5.5 KB  |  208 lines

  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
  2.  
  3. /*
  4.  *  ORBit: A CORBA v2.2 ORB
  5.  *
  6.  *  Copyright (C) 1998 Richard H. Porter
  7.  *
  8.  *  This library is free software; you can redistribute it and/or
  9.  *  modify it under the terms of the GNU Library General Public
  10.  *  License as published by the Free Software Foundation; either
  11.  *  version 2 of the License, or (at your option) any later version.
  12.  *
  13.  *  This library is distributed in the hope that it will be useful,
  14.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  *  Library General Public License for more details.
  17.  *
  18.  *  You should have received a copy of the GNU Library General Public
  19.  *  License along with this library; if not, write to the Free
  20.  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  *
  22.  *  Author: Dick Porter <dick@cymru.net>
  23.  *
  24.  */
  25.  
  26. #ifndef _ORBIT_IOP_H_
  27. #define _ORBIT_IOP_H_
  28.  
  29. #include <ORBitutil/basic_types.h>
  30.  
  31. #include <orb/corba_basic_sequences_type.h>
  32.  
  33. #ifndef HAVE_CORBA_PRINCIPAL
  34. #define HAVE_CORBA_PRINCIPAL 1
  35. typedef CORBA_sequence_octet CORBA_Principal;
  36. #endif
  37.  
  38. typedef CORBA_unsigned_long IOP_ProfileId;
  39.  
  40. #define IOP_TAG_INTERNET_IOP 0
  41. #define IOP_TAG_MULTIPLE_COMPONENTS 1
  42. #define IOP_TAG_ORBIT_SPECIFIC 0xbadfaecal
  43.  
  44. typedef struct IOP_TaggedProfile {
  45.     IOP_ProfileId tag;
  46.     CORBA_sequence_octet profile_data;
  47. } IOP_TaggedProfile;
  48.  
  49. typedef struct CORBA_sequence_TaggedProfile {
  50.     CORBA_unsigned_long _maximum;
  51.     CORBA_unsigned_long _length;
  52.     IOP_TaggedProfile *_buffer;
  53. } CORBA_sequence_TaggedProfile;
  54.  
  55. typedef struct IOP_IOR {
  56.     CORBA_char *type_id;
  57.     CORBA_sequence_TaggedProfile profiles;
  58. } IOP_IOR;
  59.  
  60. typedef CORBA_unsigned_long IOP_ComponentId;
  61.  
  62. typedef struct IOP_TaggedComponent {
  63.     IOP_ComponentId tag;
  64.     CORBA_sequence_octet component_data;
  65. } IOP_TaggedComponent;
  66.  
  67. typedef struct CORBA_sequence_TaggedComponent {
  68.     CORBA_unsigned_long _maximum;
  69.     CORBA_unsigned_long _length;
  70.     IOP_TaggedComponent *_buffer;
  71. } CORBA_sequence_TaggedComponent;
  72.  
  73. typedef struct CORBA_sequence_TaggedComponent IOP_MultipleComponentProfile;
  74.  
  75. #define IOP_TAG_ORB_TYPE 0
  76. #define IOP_TAG_CODE_SETS 1
  77. #define IOP_TAG_SEC_NAME 14
  78. #define IOP_TAG_ASSOCIATION_OPTIONS 13
  79. #define IOP_TAG_GENERIC_SEC_MECH 12
  80.  
  81. typedef CORBA_unsigned_long IOP_ServiceId;
  82.  
  83. typedef struct IOP_ServiceContext {
  84.     IOP_ServiceId context_id;
  85.     CORBA_sequence_octet context_data;
  86. } IOP_ServiceContext;
  87.  
  88. typedef struct CORBA_sequence_ServiceContext {
  89.     CORBA_unsigned_long _maximum;
  90.     CORBA_unsigned_long _length;
  91.     IOP_ServiceContext *_buffer;
  92. } CORBA_sequence_ServiceContext;
  93.  
  94. typedef struct CORBA_sequence_ServiceContext IOP_ServiceContextList;
  95.  
  96. #define IOP_TransactionService 0
  97. #define IOP_CodeSets 1
  98.  
  99. typedef CORBA_unsigned_long CONV_FRAME_CodeSetId;
  100.  
  101. typedef struct CORBA_sequence_CodeSetId {
  102.     CORBA_unsigned_long _maximum;
  103.     CORBA_unsigned_long _length;
  104.     CONV_FRAME_CodeSetId *_buffer;
  105. } CORBA_sequence_CodeSetId;
  106.  
  107. typedef struct CONV_FRAME_CodeSetComponent {
  108.     CONV_FRAME_CodeSetId native_code_set;
  109.     CORBA_sequence_CodeSetId conversion_code_sets;
  110. } CONV_FRAME_CodeSetComponent;
  111.  
  112. typedef struct CONV_FRAME_CodeSetComponentInfo {
  113.     CONV_FRAME_CodeSetComponent ForCharData;
  114.     CONV_FRAME_CodeSetComponent ForWcharData;
  115. } CONV_FRAME_CodeSetComponentInfo;
  116.  
  117. typedef struct CONV_FRAME_CodeSetContext {
  118.     CONV_FRAME_CodeSetId char_data;
  119.     CONV_FRAME_CodeSetId wchar_data;
  120. } CONV_FRAME_CodeSetContext;
  121.  
  122. typedef struct GIOP_Version {
  123.     CORBA_octet major;
  124.     CORBA_octet minor;
  125. } GIOP_Version;
  126.  
  127. typedef enum {
  128.     GIOP_Request=0,
  129.     GIOP_Reply,
  130.     GIOP_CancelRequest,
  131.     GIOP_LocateRequest,
  132.     GIOP_LocateReply,
  133.     GIOP_CloseConnection,
  134.     GIOP_MessageError
  135. } GIOP_MsgType_1_0;
  136.  
  137. typedef struct GIOP_MessageHeader_1_0 {
  138.     CORBA_char magic[4];
  139.     GIOP_Version GIOP_version;
  140.     CORBA_boolean byte_order;
  141.     CORBA_octet message_type;
  142.     CORBA_unsigned_long message_size;
  143. } GIOP_MessageHeader_1_0;
  144.  
  145. typedef struct GIOP_MessageHeader_1_1 {
  146.     CORBA_char magic[4];
  147.     GIOP_Version GIOP_version;
  148.     CORBA_octet flags;
  149.     CORBA_octet message_type;
  150.     CORBA_unsigned_long message_size;
  151. } GIOP_MessageHeader_1_1;
  152.  
  153. typedef struct GIOP_RequestHeader_1_0 {
  154.     IOP_ServiceContextList service_context;
  155.     CORBA_unsigned_long request_id;
  156.     CORBA_boolean response_expected;
  157.     CORBA_sequence_octet object_key;
  158.     CORBA_char *operation;
  159.     CORBA_Principal requesting_principal;
  160. } GIOP_RequestHeader_1_0;
  161.  
  162. typedef struct GIOP_RequestHeader_1_1 {
  163.     IOP_ServiceContextList service_context;
  164.     CORBA_unsigned_long request_id;
  165.     CORBA_boolean response_expected;
  166.     CORBA_octet reserved[3];
  167.     CORBA_sequence_octet object_key;
  168.     CORBA_char *operation;
  169.     CORBA_Principal requesting_principal;
  170. } GIOP_RequestHeader_1_1;
  171.  
  172. typedef struct GIOP_SystemExceptionReplyBody {
  173.     CORBA_char *exception_id;
  174.     CORBA_unsigned_long minor_code_value;
  175.     CORBA_unsigned_long completion_status;
  176. } GIOP_SystemExceptionReplyBody;
  177.  
  178. typedef struct GIOP_CancelRequestHeader {
  179.     CORBA_unsigned_long request_id;
  180. } GIOP_CancelRequestHeader;
  181.  
  182. typedef struct GIOP_LocateRequestHeader {
  183.     CORBA_unsigned_long request_id;
  184.     CORBA_sequence_octet object_key;
  185. } GIOP_LocateRequestHeader;
  186.  
  187. typedef struct IIOP_Version {
  188.     CORBA_octet major;
  189.     CORBA_octet minor;
  190. } IIOP_Version;
  191.  
  192. typedef struct IIOP_ProfileBody_1_0 {
  193.     IIOP_Version iiop_version;
  194.     CORBA_char *host;
  195.     CORBA_unsigned_short port;
  196.     CORBA_sequence_octet object_key;
  197. } IIOP_ProfileBody_1_0;
  198.  
  199. typedef struct IIOP_ProfileBody_1_1 {
  200.     IIOP_Version iiop_version;
  201.     CORBA_char *host;
  202.     CORBA_unsigned_short port;
  203.     CORBA_sequence_octet object_key;
  204.     CORBA_sequence_TaggedComponent components;
  205. } IIOP_ProfileBody_1_1;
  206.  
  207. #endif /* !_ORBIT_IOP_H_ */
  208.